// yl_lidar.h

#ifndef DODO_YL_LIDAR_H
#define DODO_YL_LIDAR_H

#include <quigon.h>
#include <string>
#include <vector>

namespace quigon
{

typedef BasicLidarLine<double, double> YL_Line;
#ifdef _MSC_VER
#pragma pack( push, 1 )
#endif
struct YL_Raw
{
	unsigned char unit_number;
	unsigned char version;
	union
	{
		unsigned short date[3];
		struct
		{
			unsigned short year, month, day;
		};
	};
	union
	{
		unsigned short time[3];
		struct
		{
			unsigned short hours, minutes, seconds;
		};
	};  // - at the end of profile

	unsigned short laser_freq; // Hz
	unsigned int total_shots;  //4 bytes!!
	float energy;
	float temp_detector;
	float temp_box;
	float temp_laser;
	unsigned int cbh;
	float background;
	unsigned int bin_time_ns;
	unsigned int maxaltitude;
	unsigned int dtc;
	double reserverd1;
}
#ifdef __GNUC__
__attribute__((packed))
#endif
;
#ifdef _MSC_VER
#pragma pack( pop )
#endif

const std::string yl_aver_attr_array[] =
{
	"energy",
	"cbh",
	"background",
	"temp_detector",
	"temp_box",
	"temp_laser"
};

const std::vector<std::string> yl_aver_attr(
        yl_aver_attr_array,
        yl_aver_attr_array + sizeof(yl_aver_attr_array) / sizeof(std::string)
);


}

#endif

